import os

file = os.getcwd() + os.sep + "01字符编码.txt"
#返回的是一个文件的操作句柄
f = open(file,"r",encoding="GBK")
#读取所有字符
data = f.read()
print(data)
f.close()